package parseAndHandleTool;

import com.oocl.crm_system.Constant;
import com.oocl.crm_system.Customer;
import com.oocl.crm_system.DoublyList;

public class ParseCmdForHelp extends ParseCmd{
	
	/**
	 * 
	 * @param list
	 * @param inputByConsole
	 * @return void
	 * @Description help user to use this system
	 */
	public void parseCmdForHelp(DoublyList<Customer> list,String inputByConsole){
		String input = inputByConsole;
		if(input.length() == 1){
			System.out.println(Constant.getHelpString());
		}
		else{
			char p = input.charAt(2);
			switch(p){
			case 'A': 
				System.out.println(Constant.getHelpAdd());
				break;
			case 'D':
				System.out.println(Constant.getHelpDelete());
				break;
			case 'U':
				System.out.println(Constant.getHelpUpdate());
				break;
			case 'O': 
				System.out.println(Constant.getHelpSort());
				break;
			case 'L':
				System.out.println(Constant.getHelpLook());
				break;
			case 'Q':
				System.out.println(Constant.getHelpQuit());
				break;
			default:
				;
			}
		}
	}
}
